import java.util.Scanner;

public class Java22 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int all = fun(sc.nextInt());
        System.out.println(all);
    }
    public static int fun(int num){
        if(num > 1){
            return num*fun(num-1);
        }
        return num;
    }
}
